Position Sensing of a Piston in a Hydraulic Cylinder Using a Photo Image Sensor

ABSTRACT

Described is a device and method of measuring the linear position of a piston  002  movable within a hydraulic or pneumatic cylinder barrel  001 . The measuring device includes a photo optical sensing apparatus  011  mounted at the cylinder head. The photo optical sensing apparatus  011  can be located inside or outside of the cylinder  001 . The sensing apparatus  011  design utilizes a typical optical sensing apparatus, and optional functional modules for determining absolute displacement, and communication. Calibration locations, which are used to obtain absolute displacement measurements, are determined by calibration images or separate sensors indicating their presence.

BACKGROUND OF THE INVENTION

1. Field of Invention

This invention relates to using an optical photo sensor for measuringmechanical movement of a piston, rotor, joint, or other mechanicalapparatus with reliable absolute position measurements obtained throughrepeated calibration of the optical photo sensor measured relative tothe position of the piston, rotor, joint, or other mechanical apparatus.

2. Description of Prior Art

Measuring the absolute position of a piston relative to the cylinder isfundamental to control the operation of machinery. Correspondingly,industry has produced a variety of position sensing apparatuses usingmechanical, magnetic, acoustic, and optical techniques for determiningthe instantaneous position of the movable piston or rotor.

One class of piston position sensing techniques is based on magneticfield sensors. U.S. Pat. No. 6,989,669 B2 forms a magnetically hardlayer on the piston rod, and uses sensor to read the magnetic patternrecorded in the layer. However, the piston rod needs to be reproduced inorder to form a magnetically hard layer on it, and the harsh environmentmay accidentally erase or alternate the magnetic pattern, which causesmeasurement unreliability. U.S. Pat. No. 6,690,160 B2 grooves thehousing of the cylinder and mounts two magnetic members in the cylinderhousing. Then, a magnetic field sensor generates signals which indicatethe relative distance between the two magnetic members. Accordingly, thepiston position is determined. This invention needs to groove thecylinder housing, which make the manufacturing and changing of componentnot easy. U.S. Pat. No. 5,201,838 uses a Hall effect transistor to sensethe magnetic field which is generated by a permanent magnet. The sensedsignal is used to determine the position of the piston. The accuracy ofposition measurement depends on the performance of the magnetic fieldsensor in use, and this class of position sensing technique isvulnerable in a strong magnetic environment.

Some inventions indirectly measure the piston position using varioussensors. For example, U.S. Pat. No. 6,817,252 B2 uses a bi-directionalflow sensor; U.S. Pat. No. 3,970,034 uses co-operating pairs of pressuresensors; U.S. Pat. No. 6,848,323 B2 measures the position based on adifferential pressure flow sensor. U.S. Pat. No. 6,549,873 B1 senses thespeed of ultrasonic wave and records time length. In U.S. Pat. No.4,523,514, a potentiometric positioning sensing transducer is used,which is immunized to electrical noise. These sensors are readilyavailable. However a complex detector means is required in order toobtain an accurate measurement. Moreover, correction required foraccurate measurement requires additional sensors or apparatus, whichincrease the expenses. Even with complex additional sensors the accuracyof these sensing methods is very limited.

Resonant frequency techniques have been used in several inventions, suchas U.S. Pat. No. 5,471,147, U.S. Pat. No. 5,438,274, U.S. Pat. No.4,936,143, U.S. Pat. No. 5,617,034. The common feature of this class ofposition measurement methods is that a RF transmitting section and areceiving section are used to determine the resonant frequency of thecavity, which indicates the piston position. The RF signals in useinclude radio frequency signals, alternating pressure signals, andelectromagnetic waves. Unfortunately oil is an efficient absorber of RFenergy, as a result a significant portion of the transmitted RF energyis lost to heating the oil.

Piston position sensing techniques based on mechanical orelectromechanical sensors were designed, for example, U.S. Pat. No.5,438,261 uses a coil and an oscillator which produces a position signalas the reciprocating movement of the piston. U.S. Pat. No. 6,234,061 B1and U.S. Pat. No. 6,694,861 B2 both use a non-contactingelectromechanical transducer to provide an output signal proportional tothe position or motion of the piston. However, these inventions need tomount the measurement apparatus in the cylinder, which makes manufactureand maintenance not easy. Moreover, extra power is needed to transmitand receive signals.

U.S. Pat. No. 5,977,778 and U.S. Pat. No. 6,722,260 B1 use thereflection of signals to measure the piston position in a cylinder. Thesignals in use include electromagnetic bursts and microwave pulses. Theextension measurement directly depends on the transmitter and receiver.However, in order to obtain a more accurate measurement, more power isneeded for signal transmitting and receiving. Moreover, the leaking ofelectromagnetic bursts or microwave pulses may be harmful to thesurroundings, and the cylinder needs to be extensively modified toaccommodate the sensing assembly, which causes relatively highcomplexity and cost, and relatively low reliability, durability, andaccuracy.

Moreover, U.S. Pat. Nos. 4,814,553 and 7,268,341 provides an opticalapparatus for determining the absolute position of a point on a surfaceor along a path including a tablet, scale, or overlay and a movablemouse-type cursor. The optical apparatus relies on markings added to thesurface of the moving piston or rotor. These optical markings are costlyto produce and are prone to rapid wear.

BACKGROUND OF THE INVENTION Objects and Advantages

Standard commercial photo optical image sensing apparatus such as thoseused in a computer optical mice are inexpensive, reliable and draw verylittle power. These photo image sensors can measure relative horizontaldisplacement on a wide variety of surfaces. The photo image sensors areable to withstand extremely high shock loads and a wide temperaturerange. These characteristics combined with the photo image sensor lowcost, results in the photo image sensors being an attractive alternativeto conventional position sensors used for piston or rotary actuators.

These photo image sensors are however susceptible to airborne andsurface contaminants which affect the optical image quality resolved bythe photo image sensor. This limitation is overcome by enclosing thephoto image sensor inside a protective housing. The protective housingis sealed against the movable piston or rotor surface. This arrangementprevents airborne and surface contaminants from entering into theprotected enclosed space housing the photo image sensor. The protectivehousing also protects the photo image sensor from mechanical damage inthe industrial application environment. As a result of the small size ofthe photo image sensor, the protective housing can be mounted withoutsignificant modification to either piston or rotary actuators. Forexample, on piston actuators, the protective housing enclosing the photoimage sensor can be easily mounted at the cylinder head either insidethe cylinder body or outside the cylinder body.

High resolution standard commercial photo image sensors are availablewith resolutions of 1600 counts per inch or greater. The error distancemeasured in counts is extremely small. Low cost photo image sensors witherror distances of less than 5 counts in 6400 are commonly available.However, if the absolute displacement measurement of the piston or rotoris not corrected, errors will accumulate over time. This limitation isovercome by integrating the calibration positions that reduced theaccumulated error. At these calibration positions, the absolutedisplacement measurement is rectified which zeros the accumulated errordistance. The high accuracy of the photo image sensor is maintained byzeroing the accumulated error distance. As a result, the limitationswhich currently prevent economical mass produced photo image sensorsfrom greater industrial application use are overcome.

SUMMARY

Accordingly, an apparatus to measure the planar movement betweensurfaces in applications such as a piston within a cylinder includes aphoto image sensing apparatus fixed at the cylinder head. The designedphoto image sensing apparatus utilizes a typical optical sensingapparatus, and optional functional modules for determining absolutedisplacement, traveled path distance, and communication. Calibrationlocations, which are used to obtain absolute displacement measurements,are determined by calibration images or separate sensors indicatingtheir presence.

DRAWINGS Figures

The advantages of this invention may be better understood by reading thefollowing description as well as the accompanying drawings, wherenumerals indicates the structural elements and features in variousfigures. The drawings are not necessarily to scale, and they demonstratethe principles of the invention.

FIG. 1 is a cross section view of a hydraulic cylinder with an attachedphoto image sensor taken along cutting plane A-A of FIG. 6;

FIG. 2 is block diagram of a photo image sensing apparatus;

FIG. 3A is a side view of a piston rod with recorded calibrationpattern;

FIG. 3B is a side view of a piston rod with encoded calibration pattern;

FIG. 3C is a side view of a piston rod with different calibrationpatterns at three positions;

FIG. 4 is a flow diagram of the main control loop of an embodiment ofthe present invention;

FIG. 5 is a flow diagram of the positioning subroutine as called by themain control loop of FIG. 4;

FIG. 6 is an isometric view of hydraulic cylinder with an attached photoimage sensor

DRAWINGS Reference Numerals

-   001 hydraulic cylinder barrel-   002 piston-   003 piston rod-   004 base stop-   005 head stop-   006 seal in cylinder-   007 hydraulic cylinder head chamber-   008 hydraulic cylinder base chamber-   010 sensing apparatus housing-   011 photo image sensing apparatus-   012 seals for sensing apparatus-   018 base contact pressure sensor-   019 head contact pressure sensor-   030 sensor board-   031 microprocessor-   032 EPROM-   033 SRAM/Flash-   034 RAM-   035 battery-   036 image sensor-   037 light emitting diode or laser-   038 light opening-   039 USB interfaces-   040 CAN bus interface-   051 recorded calibration pattern-   052 encoded calibration pattern-   053 calibration pattern at position 1-   054 calibration pattern at position 2-   055 calibration pattern at position 3-   060 reset timer-   062 initialization, validation and communication-   064 read main operating state-   066 operation or calibration state decision-   068 calibration state-   070 position measurement operation state-   072 communication service-   080 read pixel image-   082 pattern match between current position pixel image and previous    position pixel image-   084 measure relative displacement-   085 estimated absolute displacement-   086 pattern match between current position pixel image and    calibration pixel image-   088 matched calibration image decision-   090 measure absolute displacement between current position and    calibration position-   091 statistical analysis-   092 estimate absolute displacement from previous absolute    displacement and relative displacement-   093 reliability analysis-   094 read contact register-   096 no contact decision-   098 no operation-   100 base contact decision-   102 reset absolute displacement to minimum-   104 head contact decision-   106 reset absolute displacement to maximum-   108 report error

DETAILED DESCRIPTION

FIG. 6 is an isometric view of hydraulic cylinder with an attached photoimage sensor and shows the cutting line A-A used to obtain the crosssection shown in FIG. 1.

FIG. 1 shows a side cross-sectional view of an embodiment of a hydrauliccylinder assembly with a photo image sensing apparatus 011. Thehydraulic cylinder assembly includes a cylinder barrel 001 and a sensingapparatus housing 010. A piston 002 is arranged within the cylinderbarrel 001 for reciprocating motion along an axis in response tohydraulic fluid. The piston 002 partitions the cylinder barrel 001 intotwo chambers, 007 and 008. The housing 010 is securely mounted on thecylinder barrel 001.

One end of a piston rod 003 is fixed to the piston 002 and extends alongthe axis of the movement. The other end of the piston rod 003 extendsout of the housing 010. Either or both the cylinder base and outside endof the piston rod 003 maybe connected directly or indirectly with amachine component.

The cylinder barrel 001 has two openings for the passage of fluid suchas oil or water into and out of the chambers 007, 008 for moving thepiston 002. Seals 006 within the cylinder barrel 001 are arranged to lieflush with the surface of the piston rod 003 and thus prevent fluid fromleaving the chamber 007.

The housing 010 encloses a photo image sensing apparatus 011, which isused to determine the instantaneous position of the piston rod 003.Seals 012 within the housing 010 are arranged to clean the surface ofthe piston rod 003 and thus prevent fluid or dirt from contaminating thesensing apparatus 011. The housing 010 provides protection for the photoimage sensing apparatus 011 from the environment and permits easyreplacement of the sensing unit. The photo image sensing apparatus 011is mounted in the housing 010 within proximity of the piston rod'ssurface to permit reading of the movement of the piston rod 003.

The head contact pressure sensor 019 is mounted at the head stop 005 ofthe cylinder barrel 001. The base contact pressure sensor 018 is mountedat the base stop 004 of the cylinder barrel 001. Together these twocontact sensors provide a two-bit digital signal to indicate whether thepiston 002 reaches the head stop 005 or the base stop 004, or neither.Correspondingly when the piston 002 reaches either the head 005 or basestop 004, the absolute displacement information in storage is adjustedand updated.

In operation, fluid forced into or removed from the chambers 007, 008 attime-varying pressures causes the piston 002 and thus the piston rod 003to slide back and forth relative to the photo image sensor 011. Thephoto image sensor 011 reads the relative displacement of the piston rod003 and produces a corresponding digital signal. The microprocessor 031on the sensor board 030 calculates the absolute displacement of thepiston rod 003 by matching the calibration pattern and using therelative displacement. The obtained absolute displacement indicates theactual position of the piston rod 003 and piston 002.

FIG. 2 is a diagrammatic view of the laser photo optical sensingapparatus 011, which includes a light emitting diode or laser 037, apixel image sensor 036, a microprocessor 031, and peripheral electroniccircuit. The light emitter 037 projects light, the light beam reflectedfrom the piston rod 003 surface, and the image sensor 036 captures thereflected image. Afterwards the image sensor 036 transfers the capturedpixel image to the microprocessor 031. The microprocessor 031 calculatesthe relative displacement and the absolute displacement by comparing thecurrent captured pixel image with the stored pixel images. A SRAM orFlash memory 033 stores a recorded calibration pattern 051 of the pistonrod 003 at a specific location, and an EPROM 032 stores encodedcalibration pattern 052 of the piston rod 003 at a specific location andprogram used by the microprocessor 031. A battery 035 is used to supplypower for the sensing apparatus 011. The sensor board 030 providescommunication interface, one is USB interface 039 and the other is CANbus interface 040. The USB interface 039 is used to communicate with thecontact pressure sensors 018, 019 within the cylinder barrel 001, andthe CAN bus interface 040 is used to communicate with other units on themachine. The sensor board 030 is quite similar with the electronic boardin an optical mouse. Extra functional modules are added to achieveadditional calibration and communication functionalities.

FIG. 3A and FIG. 3B are diagrammatic views of two piston rods 003 withdifferent calibration patterns. In FIG. 3A, the pattern 051 on thepiston rod 003 is an inherent feature of the piston rod 003 at aspecific location. In FIG. 3B, the pattern on the piston rod 003represents an encoded feature stenciled at a specific location on thepiston rod 003. The pattern shown in FIG. 3B is a representative exampleof one of many possible choices which will uniquely identify the pistonrod's 003 position. The purpose of the encoded pattern 052 is to easilycalibrate the absolute displacement. Both of these two calibrationpatterns can be used to calculate the absolute displacement of thepiston rod 003.

FIG. 3C is a diagrammatic view of a piston rod 003 with three differentcalibration patterns 053, 054, and 055 at three calibration positions.These three calibration patterns can be either recorded ones or encodedones. The number of calibration patterns is not confined to three. Thenumber and placement of calibration patterns is determined byapplication requirements. Multiple calibration patterns enables morefrequent calculation of the absolute displacement so that the estimatedabsolute displacement is closer to the actual absolute displacement.Unique calibration patterns make it possible to determine which is thecurrent calibration position based on its calibration pattern.

The multiple calibration positions can be used to estimate the pistonabsolute displacement as follows. In order to avoid unnecessary numberof comparisons, the current absolute displacement of the piston is usedto determine the two calibration positions bordering it. In the casewhere all the calibration positions are to one side of the piston, onlythe first calibration position needs to be considered. The observedsurface at the current absolute displacement only needs to be comparedwith the two adjacent calibration patterns. For example, if the pistonis located between the calibration position 1 and 2, then the observedsurface absolute displacement only needs to be compared with thecalibration patterns 053 and 054.

The surface quality or average pixel shade of the piston rod aremeasured by the laser image sensor 036. A suddenly change in surfacequality or average pixel shade is used to indicate a calibrationposition. The surface quality or average pixel shade at each calibrationposition differ such that their unique surface qualities distinguisheach from the other. Unique surface qualities or pixel shades of eachcalibration position are not necessary to calibrate the absolutedisplacement measurement. The Unique calibration positions ensure thatone calibration position is not mistaken for another. The neighbouringcalibration positions are determined by the piston's current estimatedabsolute displacement. When a calibration position is detected by itssuddenly changed surface quality/average pixel shade or by recognizingits specific surface quality/average pixel shade, the piston absolutedisplacement estimated is corrected. The surface qualities and/or pixelshades at all calibration positions are pre-stored in the Flash memory033 or EPROM 032 as required.

FIG. 4 refers to the main control logic of the laser photo opticalsensing apparatus 011. In control block 060, a timer is reset. The timeris of conventional design and is used to detect if the microprocessor031 is not executing the designed control logic. The use of a timer iswell known in the art and is therefore not further discussed.

In control block 062, the system is initialized. The initializationroutine includes validating the hardware, and software parameters,testing the communication channels. Any errors detected during thisinitialization process are reported according to their severity.Critical errors which prevent the initialization process from completingor would prevent the correct operation of the sensing apparatus 011cause the microprocessor 031 to report a warning error or themicroprocessor 031 to exit on critical error.

In control block 064, the state of the sensing apparatus 011 is checked.The sensing apparatus 011 has two functional states, one is operation,and the other is calibration.

If the state is the calibration state, control flow proceeds to thecontrol block 068. If the state is the operation state, control flowproceeds to the control block 070.

In control block 068, the location of the recorded calibration patternis precisely measured, and the location and pattern information isstored into the SRAM 033.

In control block 070, the subroutine GETPP is called. As explainedbelow, the GETPP subroutine determines the absolute displacement of thepiston rod 003 and a confidence interval of the estimated absolutedisplacement.

In control block 072, the system communications are serviced. Thisincludes reading the absolute displacements from the SRAM/Flash 033,calculating a checksum for transmission purposes, transmitting the datafrom the sensor apparatus 011 to other control units, and indicating thereliability of the sensor apparatus 011.

FIG. 5 illustrates the operation of the subroutine GETPP, whichcalculates the absolute displacement of the piston rod 003.

In control block 080, the photo image sensor 036 reads the pixel imageof the light reflected from the surface of the piston rod 003, and thensends the pixel image to the microprocessor 031.

In control block 082, the microprocessor 031 reads the previous pixelimage from the RAM 034, and compares it with the current pixel imagereceived from the photo image sensor 036. Then, the microprocessor 031calculates the relative displacement of the piston rod 003 and stores itinto the RAM 034. A movement count is used to record the number ofrelative displacement measurements taken since previous absolutedisplacement measurement at the calibration position. The movement countincrements by one and is stored into the SRAM/FLASH 033.

In control block 084, the microprocessor 031 reads the mean absolutedisplacement error and the movement count from SRAM/FLASH 033, and readsthe relative displacement of the piston from RAM 034. Then, themicroprocessor 031 uses this information to correct the relativedisplacement, and stores the corrected relative displacement into RAM034.

In control block 085, a corrected absolute displacement is calculated byadding the most recent corrected relative displacement to the previouscorrected absolute displacement. The calculated corrected absolutedisplacement is named as estimated absolute displacement, and it isstored into the SRAM/FLASH 033.

In control block 086, the microprocessor 031 compares the current pixelimage with the calibration patterns which are stored in EPROM 032 orSRAM/FLASH 033, respectively.

In control block 088, if the current pixel image matches either of thecalibration patterns 051 or 052, the control goes to control block 090,Otherwise, control proceeds to control block 092.

In control block 090, the absolute displacement is directly obtainedfrom the precise location of either the calibration patterns 051 or 052.The absolute displacement is obtained by pattern matching the currentpixel image with the stored calibration patterns 051 or 052. The newabsolute displacement is stored into the SRAM/FLASH 033.

In control block 091, statistical analysis is implemented. The absolutedisplacement measurement error, movement count, and traveled pathdistance are first calculated and stored into SRAM/FLASH 033. Theabsolute displacement measurement error is calculated using thefollowing pseudo code:

Estimate absolute displacement=Absolute displacement at most recentcount+Relative displacement measurements

Thus, the absolute displacement measurement error is calculated usingthe following pseudo code:

Absolute displacement measurement error=Absolute displacement at acalibration location−Estimated absolute displacement at the calibrationlocation

The traveled path distance is calculated using the following pseudocode:

Traveled path distance=Sum of the absolute values of all previousrelative displacements

Then, the microprocessor 031 calculates the mean and variance of theabsolute displacement error in relation to movement count. Obviously,the error mean and variance will increase as the movement countincreases.

The mean and variance of the absolute displacement error is stored inthe SRAM/FLASH 033 for the correction of the relative displacement incontrol block 084. Finally, the movement count is reset to be zero.

In control block 092, the absolute displacement is set to be theestimated absolute displacement.

In control block 093, reliability of the absolute displacementestimation is analyzed. The relationship between the absolutedisplacement measurement error and the traveled path distance of thepiston rod 003 is determined, where the absolute displacementmeasurement error is described as a function of the traveled pathdistance. Basically, the absolute displacement measurement errorincreases as the traveled path distance increases. Accordingly, thefunction is used to determine the reliable or confident path distancethe piston rod can travel.

Moreover, the microprocessor 031 calculates a confidence interval of theestimated absolute displacement using its probability density functionand movement count. Excessively low confidence in the estimated absolutedisplacement signals that the optical apparatus for measuring mechanicaldisplacement is not functioning with sufficient accuracy and correctivemeasures are required.

Furthermore, the possibility density distribution of the absolutedisplacement measurement error with respect to the absolute displacementand/or traveled path distance is calculated. The possibility densitydistribution function is used to optimally determine the number andlocation distribution of the calibration patterns, which to the greatestextent minimize the absolute displacement measurement error.

In control block 094, a register that indicates the states of the twocontact pressure sensors 018 and 019 in the cylinder barrel 001 is readby the microprocessor 031.

In control block 096, if the register's value is 00, the piston 003 hasneither reached the base stop 004 nor the head stop 005, then controlgoes to control block 098. Otherwise, control proceeds to control block100.

In control block 098, no operation and control returns to the maincontrol loop.

In control block 100, if the register's value is 01, the piston 002 hasreached the base stop 004, then control goes to control block 102.Otherwise, control proceeds to control block 104.

In control block 102, the absolute displacement value is set to itsminimum and control returns to the main control loop.

In control block 104, if the register's value is 10, the piston 002 hasreached the head stop 005, then control goes to control block 106.Otherwise, control proceeds to control block 108.

In control block 106, the absolute displacement value is set to itsmaximum and control returns to the main control loop.

In control block 108, the register's value must be 11 or uncertainvalue, which means an error has occurred. In this case, an error isreported and control returns to the main control loop.

CONCLUSION, RAMIFICATIONS, AND SCOPE

Although the invention has been described and shown with reference tospecific preferred embodiments, it should be understood by those who areskilled in the art that some modification in form and detail may be madetherein without deviating from the spirit and scope of the invention asdefined in the following claims. For example, the housing 010 can bemounted within the cylinder barrel 001 in order to avoid shortening thestroke length of the piston 002. Although the embodiments describedabove primarily concerns the measurement of piston's linear extension orrotary movement, the principles of the invention can be used todetermine the rotation direction and angle of the piston rod 003. Thesensor apparatus 011 can equally be attached to shaft, or rotatingsurface of rotary devices. The application of the sensor apparatus 011needs not be restricted to the described embodiment for measuring apiston's linear or rotary movement. Alternative optical lens such as amicro-lens is used to modify the working distance between the sensorapparatus 011 and the surface of which the sensor apparatus 011 ismeasuring movement.

The sensor apparatus 011 can also measure movement by means of observinga moving surface of hinge, swivel, sliding and spherical joints. When asuitable surface does not exist as part of a joining apparatus, a partwith a suitable surface can be attached to the apparatus. By adding anadditional part or parts to a joined apparatus, the sensor apparatus 011can be mounted at different location and measure its displacement withrespect to the surface of the added part.

The advantages provided by the sensor apparatus 011 included in thisinvention over prior art position sensors are availability ofinexpensive, reliable, low power sensors. The sensor apparatus 011 ismore easily installed on a wide variety of jointed apparatus than priorart position sensors. And the position and path distance measurementprovided by the sensor apparatus makes it easy to integrated withdigital electronic control systems.

Thus the scope of the invention should be determined not by theembodiments illustrated, but by the appended claims and their legalequivalents.

1. An optical apparatus for measuring mechanical displacement ofactuators, joints, or other mechanical apparatus that contain mechanicalparts that move with respect to each other comprising an optical meansof measuring movement that is fixed to a second part of said mechanicalapparatus where said second part is any of the parts of said mechanicalapparatus, such that said optical means of measuring movement isdirected at the surface of a first part of said mechanical apparatuswhere said first part is any of the other parts of said mechanicalapparatus and such that said optical means of measuring movement is ableto detect movement distance of said surface of said first part of saidmechanical apparatus by means of detecting displacement in observedpatterns on said surface of said first part of said mechanicalapparatus, whereby measured movement of said first part of saidmechanical apparatus is determined by measuring said displacement insaid observed patterns on said surface of said first part.
 2. Theoptical apparatus of claim 1, further including a protective housing,which is attached to said mechanical apparatus or is part of saidmechanical apparatus and is in proximity with said first part of saidmechanical apparatus, such that said protective housing forms aprotected space between it and said surface of said first part of saidmechanical apparatus and such that said optical means of measuringmovement is contained in said protected space, whereby said opticalmeans of measuring movement is protected from physical damage by saidprotective housing, thereby extending the useful life and reducingmaintenance of said optical means of measuring movement when used inharsh environments.
 3. The optical apparatus of claim 2, furtherincluding a barrier between said protective housing and said surface ofsaid first part of said mechanical apparatus, such that said barrierprevents contaminants, which may reduce the useful life, increaserequired maintenance, and/or interfere with the operating performance ofsaid optical means of measuring movement, from entering said protectedspace containing said optical means of measuring movement, wherebyoperating performance of said optical means of measuring movement is notinterfered with, and whereby said optical means of measuring movement isprotected from said contaminants by said barrier, thereby extending theuseful life and reducing maintenance of said optical means of measuringmovement when used in unclean environments.
 4. The optical apparatus ofclaim 1, further including a means of determining absolute displacementof said first part of said mechanical apparatus, comprising: a. a meansof determining the absolute displacement of said first part of saidmechanical apparatus at one or more calibration positions of said firstpart of said mechanical apparatus where the absolute displacement ofsaid first part of said mechanical apparatus is known, such thatabsolute displacement measurement is stored for subsequent use in saidmeans of estimating absolute displacement, b. a means of correctingabsolute displacement at said calibration position, such that the knownabsolute displacement of said calibration position is used when saidfirst part of said mechanical apparatus is at said calibration positionand such that said known absolute displacement is subsequently used inestimating absolute displacement when said first part of said mechanicalapparatus is not at a said calibration position, c. a said means ofestimating absolute displacement using the most recent said knownabsolute displacement at said calibration position and cumulativemovement measurements from said calibration position, such that if saidfirst part of said mechanical apparatus is always at a said calibrationposition, then this means of estimating absolute displacement isunnecessary, whereby said absolute displacement of said first part ofsaid mechanical apparatus is obtained by using the most recent knownabsolute displacement at said calibration position and measuringdetected displacement from said calibration position in said observedpatterns on said surface of said first part of said mechanicalapparatus.
 5. The optical apparatus of claim 4, further including ameans of using information from the current position of said first partof said mechanical apparatus and stored information from neighboringpositions of said first part of said mechanical apparatus, comprising:a. a means of storing information aiding in the recognition of adjacentor overlapping said calibration positions of said first part of saidmechanical apparatus, b. a means of using the information aiding in therecognition of said current position of said first part of saidmechanical apparatus and the stored information aiding in therecognition of said neighboring positions of said first part of saidmechanical apparatus, such that said information from said currentposition and said stored information from said neighboring positions isused to determine whether said first part of said mechanical apparatusis at a said calibration position and such that said information fromsaid current position and said stored information from said neighboringpositions is used to determine which said calibration position saidfirst part of said mechanical apparatus is at when it is a saidcalibration position, whereby using said information from said currentposition of said first part of said mechanical apparatus and said storedinformation from said neighboring positions of said first part of saidmechanical apparatus, it is possible to determine whether said firstpart of said mechanical apparatus is at a said calibration position evenwhen it is not possible to make this determination solely based on saidinformation from said current position of said first part of saidmechanical apparatus, and whereby using said information from saidcurrent position of said first part of said mechanical apparatus andsaid stored information from said neighboring positions of said firstpart of said mechanical apparatus, it is possible to determine whichsaid calibration position said first part of said mechanical apparatusis at even when it is not possible to make this determination solelybased on said information from said current position of said first partof said mechanical apparatus.
 6. The optical apparatus of claim 4,further including improved movement and absolute displacementmeasurements, comprising: a. a means of obtaining the absolutedisplacement measurement error between the estimated absolutedisplacement and the known absolute displacement at said calibrationpositions, b. a means of minimizing said absolute displacementmeasurement error between said estimated absolute displacement and theactual absolute displacement, such that a plurality of said absolutedisplacement measurement errors are analyzed to obtain a displacementmeasurement error correction, which is applied to said cumulativemovement measurements to minimize said absolute displacement measurementerror, c. a means of obtaining a confidence value for said estimatedabsolute displacement measurement by analyzing a plurality of saidabsolute displacement measurement errors, whereby said absolutedisplacement measurement error is minimized improving the accuracy ofsaid estimated absolute displacement measurements, and whereby saidestimated absolute displacement measurement is accompanied by saidconfidence value for said estimated absolute displacement measurement,thereby enabling the receiver of said estimated absolute displacementmeasurement to calculate the reliability of said estimated absolutedisplacement measurement and use said estimated absolute displacementmeasurement accordingly, and whereby said receiver of this informationmonitors said confidence values of said estimated absolute displacementmeasurements and determines if said confidence values are excessivelylow, which is indicative of said optical apparatus not functioning ormalfunctioning.
 7. The optical apparatus of claim 6, further includingimproved absolute displacement measurements, comprising: a. a means ofenumerating observations of said movement measurements of said surfaceof said first part of said mechanical apparatus occurring sincepreviously obtained said absolute displacement measurement error, b. ameans of cumulating movement measurements for finding total traveledpath distance of said first part of said mechanical apparatus occurringsince previously obtained said absolute displacement measurement error,c. a means of further minimizing said absolute displacement measurementerror by using the enumerated observations and/or said total traveledpath distances corresponding with said absolute displacement measurementerrors, d. a means of further improving confidence value for saidestimated absolute displacement measurement using said enumeratedobservations and/or said total traveled path distances correspondingwith said absolute displacement measurement errors, whereby saidconfidence values of said absolute displacement measurements areimproved, and whereby said absolute displacement measurement errors ofsaid absolute displacement measurements are reduced.
 8. The opticalapparatus of claim 4, further including stored images of natural and/orartificial patterns on said surface of said first part of saidmechanical apparatus at said calibration positions, such that saidoptical means of measuring movement is able to determine whether saidfirst part of said mechanical apparatus is at a said calibrationposition and which said calibration position said first part is at bymeans of comparing one or more images of said natural and/or artificialpatterns on said surface of said first part of said mechanical apparatuswith one or more said stored images of said natural and/or artificialpatterns on said surface of said first part of said mechanical apparatusat said calibration positions, whereby said optical apparatus recognizessaid calibration positions and uses said calibration positions to obtainsaid estimate of absolute displacement.
 9. The optical apparatus ofclaim 4, further including separate sensors, such that when said firstpart of said mechanical apparatus is at a said calibration positiondetectable by said separate sensors, then one or more of said separatesensors is activated, whereby said separate sensors indicate a saidcalibration position, and whereby said optical apparatus uses saidcalibration position to obtain said estimate of absolute displacement.10. The optical apparatus of claim 4, further limiting the number ofsaid calibration positions considered, comprising: a. a means ofdetermining one or more said calibration positions nearest to thecurrent position of said first part of said mechanical apparatus andoptionally one or more said calibration positions next nearest to saidcalibration positions of said first part of said mechanical apparatuswhere said current position of said first part of said mechanicalapparatus is uniquely identified by current said estimated absolutedisplacement of said first part of said mechanical apparatus, b. a meansof reducing the number of considered said calibration positions used todetermine whether said first part of said mechanical apparatus is at asaid calibration position and which said calibration position it is atby means of considering only nearest and optionally next nearest saidcalibration positions, whereby the processing required by said opticalapparatus to recognize whether said first part of said mechanicalapparatus is at a said calibration position is reduced, and whereby theprocessing required by said optical apparatus to recognize which saidcalibration position said first part of said mechanical apparatus is atis reduced.
 11. The optical apparatus of claim 4, further including ameans of identifying one or more localized natural and/or artificialoptical surface characteristics on said surface of said first part ofsaid mechanical apparatus, such that said localized natural and/oroptical surface characteristics on said surface of said first part ofsaid mechanical apparatus stand out from the background optical surfacecharacteristics on said surface of said first part of said mechanicalapparatus and such that said calibration positions are indicated by saidlocalized natural and/or artificial optical surface characteristics onsaid surface of said first part of said mechanical apparatus, wherebysaid optical apparatus is able to recognize said calibration positionsby said localized natural and/or artificial optical surfacecharacteristics that stand out from said background optical surfacecharacteristics.
 12. A method of measuring mechanical displacement ofactuators, joints, or other mechanical apparatus that contain mechanicalparts that move with respect to each other, comprising the step ofmeasuring movement of a first part of said mechanical apparatus throughcomparing observed patterns on the surface of said first part of saidmechanical apparatus by an optical means of measuring movement fixed tosecond part where said first part is any of the parts of said mechanicalapparatus and where said second part is any of the other parts of saidmechanical apparatus, such that said first part and said second partmove with respect to each other and such that optical means of measuringmovement is directed at said surface of said first part of saidmechanical apparatus, whereby movement of said first part of saidmechanical apparatus is measured by measuring said displacement in saidobserved patterns on said surface of said first part.
 13. The method ofclaim 12, further providing protection of said optical means ofmeasuring movement, comprising the additional step of enclosing saidoptical means of measuring movement in a protected space between saidfirst part of said mechanical apparatus and a protective housing that isattached to said second part or is part of said second part, wherebysaid optical means of measuring movement is protected from physicaldamage by said protective housing, thereby extending the useful life andreducing maintenance of said optical means of measuring movement whenused in harsh environments.
 14. The method of claim 13, furtherproviding an environment free of harmful contaminants, which may reducethe useful life, increase required maintenance, and/or interfere withthe operating performance of said optical means of measuring movement,comprising the additional step of preventing contaminants from enteringsaid protected space containing said optical means of measuring movementwith a barrier between said protective housing and said surface of saidfirst part of said mechanical apparatus, whereby said optical means ofmeasuring movement is protected from said contaminants by said barrier,thereby extending the useful life, reducing required maintenance, andwhereby said optical means of measuring movement is protected from saidcontaminants by said barrier, thereby not interfering with the operatingperformance of said optical means of measuring movement when used inharsh environments.
 15. The method of claim 12, further including ameans of determining absolute displacement of said first part of saidmechanical apparatus, comprising the additional steps of: a. determiningthe absolute displacement of said first part of said mechanicalapparatus at said calibration positions of said first part of saidmechanical apparatus where said absolute displacement of said first partof said mechanical apparatus is known, b. correcting absolutedisplacement at a said calibration position, such that the knownabsolute displacement is used when said first part of said mechanicalapparatus is at a said calibration position and such that said knownabsolute displacement is subsequently used in estimating absolutedisplacement when said first part of said mechanical apparatus is not ata said calibration position, c. estimating absolute displacement whensaid first part of said mechanical apparatus is not at a saidcalibration position using the most recent said known absolutedisplacement at said calibration position and cumulative movementmeasurement in said observed patterns on said surface of said first partfrom said calibration position, such that if said first part of saidmechanical apparatus is always at a said calibration position, then thisstep of estimating absolute displacement is unnecessary, whereby saidabsolute displacement of said first part of said mechanical apparatus isobtained by using said most recent known said absolute displacement atsaid calibration position and said cumulative movement measurement fromsaid calibration position in said observed patterns on said surface ofsaid first part of said mechanical apparatus.
 16. The method of claim15, further including information from the current position of saidfirst part of said mechanical apparatus and stored information fromneighboring positions of said first part of said mechanical apparatus,comprising the additional steps of: a. storing information aiding in therecognition of adjacent or overlapping said calibration positions ofsaid first part of said mechanical apparatus, b. using the informationaiding in the recognition of said current position of said first part ofsaid mechanical apparatus and the stored information aiding in therecognition of said neighboring positions of said first part of saidmechanical apparatus, such that said information from said currentposition and said stored information from said neighboring positions isused to determine whether said first part of said mechanical apparatusis at a said calibration position and such that said information fromsaid current position and said stored information from said neighboringpositions is used to determine which said calibration position saidfirst part of said mechanical apparatus is at when said first part is ata said calibration position, whereby using said information from saidcurrent position of said first part of said mechanical apparatus andsaid stored information from said neighboring positions of said firstpart of said mechanical apparatus, it is possible to determine whethersaid first part of said mechanical apparatus is at a said calibrationposition even when it is not possible to make this determination solelybased on said information from said current position of said first partof said mechanical apparatus, and whereby using said information fromsaid current position of said first part of said mechanical apparatusand said stored information from said neighboring positions of saidfirst part of said mechanical apparatus, it is possible to determinewhich said calibration position said first part of said mechanicalapparatus is at even when it is not possible to make this determinationsolely based on said information from said current position of saidfirst part of said mechanical apparatus.
 17. The method of claim 15,further improving movement measurements and absolute displacementmeasurements, comprising the additional steps of: a. obtaining theabsolute displacement measurement error between said estimated absolutedisplacement and the known absolute displacement at said calibrationpositions, b. analyzing a plurality of said absolute displacementmeasurement errors to obtain a displacement measurement errorcorrection, c. applying said displacement measurement error correctionto said cumulative movement measurements and said estimated absolutedisplacement to reduce said cumulative movement measurement error andsaid absolute displacement measurement error, d. analyzing a pluralityof said absolute displacement measurement errors to obtain a confidencevalue for said estimated absolute displacement measurement, whereby saidabsolute displacement measurement error is minimized improving theaccuracy of said estimated absolute displacement measurements, andwhereby said estimated absolute displacement measurement is accompaniedby said confidence value for said estimated absolute displacementmeasurement, thereby enabling the receiver of said estimated absolutedisplacement measurement to calculate the reliability of said estimatedabsolute displacement measurement and use said estimated absolutedisplacement measurement accordingly, and whereby said receiver of thisinformation monitors said confidence values of said estimated absolutedisplacement measurements and determines if said confidence values areexcessively low, which is indicative of said optical apparatus notfunctioning or malfunctioning.
 18. The method of claim 17, furtherimproving absolute displacement measurements, comprising the additionalsteps of: a. enumerating observations of said detected displacement inobserved patterns on said surface of said first part of said mechanicalapparatus occurring since previously obtained absolute displacementmeasurement error, b. cumulating movement measurements for finding totaltraveled path distance of said surface of said first part of saidmechanical apparatus occurring since previously obtained absolutedisplacement measurement error, c. minimizing said absolute displacementmeasurement error by using the enumerated observations and/or said totaltraveled path distances corresponding with said absolute displacementmeasurement errors, d. improving confidence value for said estimatedabsolute displacement measurement using said enumerated observationsand/or said total traveled path distances corresponding with saidabsolute displacement measurement errors, whereby said confidence valuesof said absolute displacement measurements are improved, whereby saidabsolute displacement measurement errors of said absolute displacementmeasurements are reduced.
 19. The method of claim 15, further includingan optical method of determining whether said first part of saidmechanical apparatus is at a said calibration position, comprising theadditional steps of: a. retrieving stored images of natural and/orartificial patterns on said surface of said first part of saidmechanical apparatus at said calibration positions, b. using saidoptical means of measuring movement to determine whether said first partof said mechanical apparatus is at a said calibration position and whichsaid calibration position it is at by means of comparing one of moreimages of said natural and/or artificial patterns on said surface ofsaid first part of mechanical apparatus with one or more stored imagesof said natural and/or artificial patterns on said surface of said firstpart of said mechanical apparatus at said calibration positions, wherebysaid optical apparatus recognizes said calibration positions and usessaid calibration positions to obtain said estimate of absolutedisplacement.
 20. The method of claim 15, further including a separatesensing method for determining whether said first part of saidmechanical apparatus is at a said calibration position, comprising theadditional steps of: a. determining whether said first part of saidmechanical apparatus is at a said calibration position by means of saidseparate sensors, b. determining which said calibration position saidfirst part of said mechanical apparatus is at when said first part is ata said calibration position by means of said separate sensors, wherebysaid separate sensors indicate a said calibration position, and wherebysaid optical apparatus uses said calibration position to obtain saidestimate of absolute displacement.
 21. The method of claim 15, furtherlimiting the number of said calibration positions considered, comprisingthe additional steps of: a. determining one or more said calibrationpositions nearest to the current position of said first part of saidmechanical apparatus and optionally one or more said calibrationpositions next nearest to said calibration positions of said first partof said mechanical apparatus where said current position of said firstpart of said mechanical apparatus is uniquely identified by current saidestimated absolute displacement of said first part of said mechanicalapparatus, b. reducing the number of considered said calibrationpositions used to determine whether said first part of said mechanicalapparatus is at a said calibration position and which said calibrationposition it is at by means of considering only nearest and optionallynext nearest said calibration positions, whereby the processing requiredby said optical apparatus to recognize whether said first part of saidmechanical apparatus is at a said calibration position is reduced, andwhereby the processing required by said optical apparatus to recognizewhich said calibration position said first part of said mechanicalapparatus is at is reduced.
 22. The method of claim 15, furtheridentifying one or more localized natural and/or artificial opticalsurface characteristics on said surface of said first part of saidmechanical apparatus, comprising the additional steps of: a. storingsaid localized natural and/or artificial optical surface characteristicsthat stand out from the background optical surface characteristics ofsaid calibration positions on said surface of said first part of saidmechanical apparatus, b. identifying as a said calibration position oneor more said localized natural and/or artificial optical surfacecharacteristics that stand out from the background optical surfacecharacteristics on said surface of said first part of said mechanicalapparatus, whereby said optical apparatus is able to recognize saidcalibration positions by said localized natural and/or artificialoptical surface characteristics that stand out from said backgroundoptical surface characteristics.